const express = require("express");
const router = express.Router();

router.post("/run", (req, res) => {
  req.app.locals.ws.send(
    `show ${req.body.traj} ${req.body.angle} ${req.body.scene}`
  );
  req.app.locals.taskInfo = {
    traj: req.body.traj,
    angle: req.body.angle,
    scene: req.body.scene,
  };
  return res.json({ code: 0, message: "下位机已激活" });
});

module.exports = router;
